<!--
 * @FilePath     : /study_code/vue2.x/slot1.html
 * @Description  : 插槽简单使用
 * @Date         : 2025-05-02 20:09:37
 * @Author       : Fang YingGui
 * @LastEditors  : fangyinggui 18715384437@163.com
 * @LastEditTime : 2025-05-02 20:09:37
-->
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>documentName</title>
    <link rel="stylesheet" href="" />
  </head>
  <body>
    <div id="app">
      <alert-box>Something bad happened.</alert-box>
    </div>

    <script src="/vue/dist/vue.min.js"></script>
    <script src="./common.js"></script>
    <script>
      Vue.component('alert-box', {
        template: `
          <div class="demo-alert-box">
            <strong>Error!</strong>
            <slot></slot>
          </div>
        `,
      })

      var vm = new Vue({
        el: '#app',
        data: function () {
          return {}
        },
      })
    </script>
  </body>
</html>
